package com.ruoyi.fly.mapper;


import com.ruoyi.fly.domain.AppletServer;
import com.ruoyi.fly.domain.vo.AppletServerSearchVo;
import com.ruoyi.fly.domain.vo.AppletServerVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AppletServerMapper {

    /**
     * 根据id查询服务详情
     *
     * @param id
     * @return
     */
    AppletServer selectAppletServerById(String id);

    /**
     * 查询服务列表
     *
     * @param appletServerSearchVo
     * @return
     */
    List<AppletServerVo> selectAppletServerList(AppletServerSearchVo appletServerSearchVo);

    /**
     * 新增服务
     *
     * @param appletServer
     * @return
     */
    int insertAppletServer(AppletServer appletServer);

    /**
     * 修改服务
     *
     * @param appletServer
     * @return
     */
    int updateAppletServer(AppletServer appletServer);


    /**
     * 上架服务
     * @param id
     * @return
     */
    int onlineServerCategory(String id);

    /**
     * 下架服务
     * @param id
     * @return
     */
    int offlineServerCategory(String id);

    /**
     * 删除服务
     *
     * @param id
     * @return
     */
    int deleteAppletServerById(String id);

    /**
     * 批量删除服务
     *
     * @param ids
     * @return
     */
    int deleteAppletServerByIds(String[]  ids);

}
